#ifndef __FH_MSHC_LITE_H__
#define __FH_MSHC_LITE_H__
/*****************************************************************************
 *  Include Section
 *  add all #include here
 *****************************************************************************/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/in.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/highmem.h>
#include <linux/proc_fs.h>
#include <linux/ctype.h>
#include <linux/version.h>
#include <linux/spinlock.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/semaphore.h>
#include <linux/phy.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/irqreturn.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <asm/irq.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <mach/pmu.h>
#include <linux/mmc/mmc.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include "sdhci-pltfm.h"
#include <mach/fh_mshc_plat.h>
#include <mach/fh_predefined.h>

/*****************************************************************************
 * Define section
 * add all #define here
 *****************************************************************************/

#define FH_SDHC_MIN_FREQ	400000
#define FH_SDHCI_MAX_FREQ  200000000
#define FH_SDHCI_INIT_FREQ  400000
//#define FH_SDHCI_MAX_FREQ  50000000

//if emmc es mode enable, set cmd clk from emmc ds
#define EMMC_ES_MODE_ENABLE		1
#define EMMC_ES_MODE_DISABLE	0
/****************************************************************************
 * ADT section
 * add definition of user defined Data Type that only be used in this file here
 ***************************************************************************/
struct fh_mshc_lite{
	void __iomem *ctrl_regs;
	void __iomem *phy_regs;
	spinlock_t lock;
	struct platform_device *pdev;
	struct mshc_lite_plat_info *mshc_plat_info;
	struct sdhci_host *bind_host;
	struct mmc_host *bind_mmc;
	struct mshc_lite_emmc_card_info *bind_active_tuning_emmc;
	int phy_irq;		/* phy irq */
	int wakeup_irq;		/* wakeup irq */
	u32 rec_timing;
	u32 rec_power;
	u32 rec_bus_width;
};



void fh_mshc_tuning_ctrl_init(struct sdhci_host *host);
void fh_mshc_tuning_set_clock(struct sdhci_host *host, u32 clock, u32 timing, u32 width, u32 es_mode);
#endif
